import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/view/Index'
import Category from '@/view/Category'
import Search from '@/view/Search'
import SearchList from '@/view/SearchList'
import productDet from '@/view/productDet'
import Login from '@/view/Login'
import Register from '@/view/Register'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/index',
      name: 'Index1',
      component: Index
    },
    {
      path: '/category',
      name: 'Category',
      component: Category
    },
    {
      path: '/search',
      name: 'Search',
      component: Search
    },
    {
      path: '/searchlist/:key',
      name: 'SearchList',
      component: SearchList
    },
    {
      path: '/productDet',
      name: 'ProductDet',
      component: productDet
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    }
  ],
  // 路由跳转新增css样式   isActive为样式名
  linkActiveClass: 'isActive'
})
